GetMediaNextInterestingTime
TheGetMediaNextInterestingTime
function searches for times of interest in a media.
pascal void GetMediaNextInterestingTime (Media theMedia, short interestingTimeFlags, TimeValue time, Fixed rate, TimeValue *interestingTime, TimeValue *interestingDuration);
theMedia
- Specifies the media for this operation. Your application obtains this media identifier from such Movie Toolbox functions as
NewTrackMedia
andGetTrackMedia
(described on page 2-138 and page 2-190, respectively).interestingTimeFlags
- Specifies the search criteria. Note that you may set only one of the
nextTimeMediaSample
,nextTimeMediaEdit
andnextTimeSyncSample
flags to 1. The following flags are available (set unused flags to 0):nextTimeMediaSample
- Searches for the next sample in the media. Set this flag to 1 to search for the next sample.
nextTimeMediaEdit
- Searches for the next group of samples in the media. Set this flag to 1 to search for the next group of samples.
nextTimeSyncSample
- Searches for the next sync sample in the media. Set this flag to 1 to search for the next sync sample.
- Sync samples do not rely on preceding frames for content. Some compression algorithms conserve space by eliminating duplication between consecutive frames in a sample.
nextTimeEdgeOK
- Instructs the Movie Toolbox that you are willing to receive information about elements that begin or end at the time specified by the
time
parameter. Set this flag to 1 to accept this information.- This flag is especially useful at the beginning or end of a media. The function returns valid information about the beginning and end of the media.
time
- Specifies a time value that establishes the starting point for the search. This time value must be expressed in the media's time scale.
rate
- Contains the search direction. Negative values cause the Movie Toolbox to search backward from the starting point specified in the
time
parameter. Other values cause a forward search.interestingTime
- Contains a pointer to a time value. The Movie Toolbox returns the first time value it finds that meets the search criteria specified in the
flags
parameter. This time value is in the media's time scale.- If there are no times that meet the search criteria you specify, the Movie Toolbox sets this value to -1.
- Set this parameter to
nil
if you are not interested in this information.interestingDuration
- Contains a pointer to a time value. The Movie Toolbox returns the duration of the interesting time. This time value is in the media's time coordinate system. Set this parameter to
nil
if you do not want this information--in this case, the function works more quickly.DESCRIPTION
GetMediaNextInterestingTime
ignores all the edits that are defined in a movie's tracks.ERROR CODES
invalidMedia -2008 This media is corrupted or invalid invalidTime -2015 This time value is invalid